package com.battleship.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

import com.battleship.R;
import com.battleship.utils.ScreenUtils;

public class BattleShip extends Activity{
	
	private int localResult = 0;
	
	private OnClickListener playLocalListener = new OnClickListener(){
		
		public void onClick(View v){
			startActivityForResult(new Intent(getApplication(), Game.class), localResult);
	    }
	};
	
	private OnClickListener multiplayerListener = new OnClickListener(){
		
		public void onClick(View v){
	    	
	    	setContentView(R.layout.game);
	    }
	};
	
	private OnClickListener quitListener = new OnClickListener(){
		
		public void onClick(View v){
	    	
	    	//Aplikazioa itxi
	    }
	};
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        ScreenUtils.setFullScreen(this);
        setContentView(R.layout.main_menu);
        //Play Local button
        Button local_button = (Button)findViewById(R.id.ButtonPlayLocal);
        local_button.setOnClickListener(playLocalListener);
        //Multiplayer button 
        Button multiplayer_button = (Button)findViewById(R.id.ButtonPlayMultiplayer);
        multiplayer_button.setOnClickListener(multiplayerListener);
        //Quit button
        Button quit_button = (Button)findViewById(R.id.ButtonClose);
        quit_button.setOnClickListener(quitListener);
        
        
    }
    
}